package com.aigis.big4.mapreduce;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;
import java.util.StringTokenizer;

public class AvgScore3 {
    public static class AvgScoreMapper extends Mapper<Text,Text,Text,Text>{

        @Override
        protected void map(Text key, Text value, Context context) throws IOException, InterruptedException {
            super.map(key, value, context);
            StringTokenizer stringTokenizer=new StringTokenizer(value.toString(),"\n");
            while (stringTokenizer.hasMoreTokens()){
                String line=stringTokenizer.nextToken();
                String[] info=line.split(",");
                String course=info[0];

                //context.write();
            }
        }
    }
}
